package cn.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.dao.UserMapper;
import cn.domain.User;
import cn.service.UserService;

@Service
@Transactional(rollbackFor=Exception.class)
public class UserServiceImpl implements UserService {

	@Autowired
	private UserMapper userMapper;

	@Override
	public List<User> getAll() {
		List<User> list = userMapper.getAll();
		return list;
	}

	@Override
	public User getOne(User user) {
		return userMapper.getOne(user);
	}

}
